<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<HEAD>
     <TITLE>Style</TITLE>
     <link rel="stylesheet" type="text/css" href="../../../ss/2.css" id="thecss">
     <script type="text/javascript" src="../../../scripts/csschange.js"></script>
</HEAD>

<BODY onload="readSS()">

<br>
<center>
<table border=3 cellpadding=5 cellspacing=0>
<tr>
     <td><h1 class="pagetitle">Style</h1>
         <b><a href="../../../misc/suppkey.htm">Support Key:</a></b> 
         [<span class="ns">2</span>|<b><i class="fs">3</i></b>|<b class="s">3.2</b><a href="#tips">*</a>|<b class="s">4</b>]
         [<b class="s">X1</b>|<b class="s">X1.1</b>]
         [<b><i class="fs">IE3B1</i></b>|<span class="ns">M</span>|<b class="s">N4B2</b>|<b class="s">O3.5</b>]</td>
     <td><a href="#what">What is it?</a><br>
         <a href="#attrib">Attributes</a><br>
         <a href="#example">Tag Example</a>
     </td>
     <td><a href="#model">Parent/Content Model</a><br>
         <a href="#tips">Tips &amp; Tricks</a><br>
         <a href="#peculiar">Browser Peculiarities</a></td>
</tr>
<tr><td align=center colspan=3>
<font size=2>= <span class="sitetitle">Index DOT Html</span> by <a href="../../../misc/email.htm">Brian Wilson</a> =</font>
</td></tr>
</table>

<font size=2>
     <a href="../../index.html">Main Index</a> |
     <a href="../../tree/htmltree.htm">Element Tree</a> |
     <a href="../../tagindex/a.htm">Element Index</a> |
     <a href="../../supportkey/a.htm">HTML Support History</a></font>
</center>
<hr align="center" width="25%">

<br><br>
<table border=1 cellspacing=0 cellpadding=5>
<tr><td>
<table border=0 cellspacing=0>
<tr>
    <th colspan=3 valign=bottom class="field"><big><u><b
        class="colheaders">&#160;&#160;&#160;Quick Statistics&#160;&#160;&#160;</b></u></big><br></th>
</tr>
<tr><th align=left><b class="l3heading"><a href="../stats.htm#et">End Tag:</a></b><br></th>
    <td rowspan=7>&nbsp;&nbsp;</td>
    <td><span class="magicword">Required</span></td></tr>
<tr><th align=left><b class="l3heading"><a href="../stats.htm#std">Standards Details:</a></b><br></th>
    <td>In all HTML 4.x/XHTML DTDs</td></tr>
<tr><th align=left><b class="l3heading"><a href="../stats.htm#xhtm">XHTML Modules:</a></b><br></th>
    <td><b class=alert>Stylesheet</b></td></tr>
<tr><th align=left valign=top><b class="l3heading"><a href="../stats.htm#disp">CSS 'display' Type:</a></b><br></th>
    <td>NA</td></tr>
<tr><th align=left valign=top><b class="l3heading"><a href="../stats.htm#css">CSS Mapping:</a></b><br></th>
    <td>NA</td></tr>
<tr><th align=left><b class="l3heading"><a href="../stats.htm#rnd">Default Rendering:</a></b><br></th>
    <td>NA</td></tr>
<tr><th align=left><b class="l3heading"><a href="../stats.htm#w3docs">Official Docs:</a></b><br></th>
    <td><a href="http://www.w3.org/TR/html401/present/styles.html#h-14.2.3">HTML 4.x</a>, 
        <a href="http://www.w3.org/TR/xhtml-modularization/abstract_modules.html#s_stylemodule">XHTML 1.1</a></td></tr>
</table>
</td></tr>
</table>

<br>
<a name="what"></a>
<dl>
<dt><big><b class="mainheading">What is it?</b></big>
    <dd>The STYLE element is one of the
        <a href="http://www.blooberry.com/indexdot/css/syntax/inclusion/inclusion.htm">three
        methods used</a> <span class="external">[--&gt;Index DOT Css]</span> to
        include style information in an HTML document.
        The STYLE element is used in the document <a href="../h/head.htm">HEAD</a>
        section to indicate style information for the entire document.
        If a <a href="../l/link.htm">LINK</a>ed stylesheet also exists for the current
        document, the CSS style rules indicated in the STYLE element should have precedence
        over styles in the LINKed stylesheet, given that each of the selectors for the
        style rules are equal. For more information on Cascading Style Sheets, please see
        <a href="http://www.blooberry.com/indexdot/css/index.html" class="relevant">Index DOT Css</a>.
        <br><br>
        
        <b class="alert">NOTE:</b> Because this HEAD element requires
        a start and end tag, older browsers may end up displaying the style
        content it contains. In order to prevent this, it is <em>STRONGLY</em>
        recommended to embed this style information within  the HTML Comment
        structure (<a href="../c/comment.htm">&lt;!-- --&gt;</a>)
</dl>


<a name="attrib"></a>
<dl>
<dt><br><big><b class="mainheading">Common Attributes</b></big><br>
<dt><b class="subheading">%<a href="../attributes/core.htm">Core</a>%</b>
    <dd>[<span class="ns">2</span>|<span class="ns">3</span>|<span class="ns">3.2</span>|<span class="ns">4</span>] 
        [<b><i class="fs">X1</i></b>|<span class="ns">X1.1</span>]
        [<b><i class="fs">IE5</i></b>|<span class="ns">M</span>|<b class="s">N6</b>|<b class="s">O4</b>]

<dt><b class="subheading">%<a href="../attributes/accessibility.htm">Accessibility</a>%</b>
    <dd>[<span class="ns">2</span>|<span class="ns">3</span>|<span class="ns">3.2</span>|<b><i class="fs">4</i></b>] 
        [<b class="s">X1</b>|<b class="s">X1.1</b>]
        [<span class="ns">IE</span>|<span class="ns">M</span>|<i><b class="fs">N6</i></b>|<span class="ns">O</span>]

<dt><b class="subheading">%<a href="../attributes/language.htm">Language</a>%</b>
    <dd>[<span class="ns">2</span>|<span class="ns">3</span>|<span class="ns">3.2</span>|<b><i class="fs">4</i></b>] 
        [<b class="s">X1</b>|<b class="s">X1.1</b>]
        [<span class="ns">IE</span>|<span class="ns">M</span>|<span class="ns">N</span>|<span class="ns">O</span>]

<dt><br><big><b class="mainheading">Specific Attributes</b></big>
<dt><b class="subheading">Disabled</b>
<dt>[<span class="ns">2</span>|<span class="ns">3</span>|<span class="ns">3.2</span>|<span class="ns">4</span>] 
    [<span class="ns">X1</span>|<span class="ns">X1.1</span>]
    [<b><i class="fs">IE4</i></b>|<span class="ns">M</span>|<span class="ns">N</span>|<span class="ns">O</span>]
    <dd><b class="l3heading"><a href="../stats.htm#std">Standards Details:</a></b> NA
    <dd><b class="l3heading">Required?</b> No
    <dd><b class="l3heading">Description:</b><br>
        This is a stand-alone attribute which indicates the style reference is
        initially non-functional.
    <dd><b class="l3heading">Values:</b> NA (HTML); <b class="alert">disabled</b> (XHTML)

<dt><b class="subheading">Language</b>
<dt>[<span class="ns">2</span>|<span class="ns">3</span>|<span class="ns">3.2</span>|<span class="ns">4</span>] 
    [<span class="ns">X1</span>|<span class="ns">X1.1</span>]
    [<span class="ns">IE</span>|<span class="ns">M</span>|<b><i><u class="sr">N4-4.x</u></i></b>|<span class="ns">O</span>]
    <dd><b class="l3heading"><a href="../stats.htm#std">Standards Details:</a></b> NA
    <dd><b class="l3heading">Required?</b> No
    <dd><b class="l3heading">Description:</b><br>
        This attribute indicates the scripting language used in this element.
    <dd><b class="l3heading">Values:</b>
        Alphanumeric string representing a scripting language.

<dt><b class="subheading">Media</b>
<dt>[<span class="ns">2</span>|<span class="ns">3</span>|<span class="ns">3.2</span>|<b><i class="fs">4</i></b>] 
    [<b class="s">X1</b>|<b class="s">X1.1</b>]
    [<b><i class="fs">IE4</i></b>|<span class="ns">M</span>|<b><i class="fs">N4</i></b>|<b class="s">O3.5</b>]
    <dd><b class="l3heading"><a href="../stats.htm#std">Standards Details:</a></b>
        In all HTML 4.x/XHTML DTDs
    <dd><b class="l3heading">Required?</b> No
    <dd><b class="l3heading">Description:</b><br>
        This attribute is a keyword representing the intended rendering
        destination for the style sheet definitions. Multiple destinations
        are given delimited by commas.
    <dd><b class="l3heading">Values:</b><br>
        <b class="alert">screen</b> [<b class="magicword">DEFAULT</b>]
        - style information should be used for rendering to computer screens.<br>
        <b class="alert">print</b> - style information
        should be used for rendering to page-centric devices, ie:
        printed paper or print preview screen modes.<br>
        <b class="alert">projection</b> - style information
        should be used for rendering to transparent projected media devices.<br>
        <b class="alert">braille</b> - style information
        should be used for rendering to braille devices.<br>
        <b class="alert">speech</b> - style information
        should be used for rendering to speech synthesizers.<br>
        <b class="alert">all</b> - style information
        should be used for rendering to all devices.<br>

<dt><b class="subheading">Title</b>
<dt>[<span class="ns">2</span>|<span class="ns">3</span>|<span class="ns">3.2</span>|<b><i class="fs">4</i></b>] 
    [<b class="s">X1</b>|<b class="s">X1.1</b>]
    [<span class="ns">IE</span>|<span class="ns">M</span>|<span class="ns">N</span>|<span class="ns">O</span>]
    <dd><b class="l3heading"><a href="../stats.htm#std">Standards Details:</a></b>
        In all HTML 4.x/XHTML DTDs
    <dd><b class="l3heading">Required?</b> No
    <dd><b class="l3heading">Description:</b><br>
        This attribute is for use when other style sheet methods are specified.
        It allows the browser to build a menu of alternative style sheets
        (such as if one or more external Style Sheets are specified through use
        of the <a href="../l/link.htm">LINK</a> element.) It may also be used to
        identify the Style Sheet in order to allow the user to have control
        over turning it on or off.
    <dd><b class="l3heading">Values:</b> <a href="../../../misc/glossary.htm#cdata">CDATA</a>.

<dt><b class="subheading">Type</b>
<dt>[<span class="ns">2</span>|<span class="ns">3</span>|<span class="ns">3.2</span>|<b><i class="fs">4</i></b>] 
    [<b class="s">X1</b>|<b class="s">X1.1</b>]
    [<b><i class="fs">IE3B1</i></b>|<span class="ns">M</span>|<b class="s">N4B2</b>|<span class="ns">O</span>]
    <dd><b class="l3heading"><a href="../stats.htm#std">Standards Details:</a></b>
        In all HTML 4.x/XHTML DTDs
    <dd><b class="l3heading">Required?</b> Yes
    <dd><b class="l3heading">Description:</b><br>
        This attribute indicates the Internet Media type (MIME) of the
        STYLE element content. This MIME type applies to style rules applied within the STYLE
        <em>element</em> area as well as to all
        <a href="http://www.blooberry.com/indexdot/css/syntax/inclusion/inline.htm">inline
        styles</a> <span class="external">[--&gt;Index DOT Css]</span> in the current
        document specified by the STYLE <em>attribute</em> used in HTML elements.
    <dd><b class="l3heading">Values:</b> <a href="../../../misc/glossary.htm#cdata">CDATA</a>.
        [The current allowed values are <b class="alert">text/css</b>, and 
        <b class="alert">text/javascript</b>]

<dt><b class="subheading">xml:space</b>
<dt>[<span class="ns">2</span>|<span class="ns">3</span>|<span class="ns">3.2</span>|<span class="ns">4</span>] 
    [<b><i class="fs">X1</i></b>|<b class="s">X1.1</b>]
    [<span class="ns">IE</span>|<span class="ns">M</span>|<span class="ns">N</span>|<span class="ns">O</span>]
    <dd><b class="l3heading"><a href="../stats.htm#std">Standards Details:</a></b> Intrinsic part of XML
    <dd><b class="l3heading">Required?</b> No
    <dd><b class="l3heading">Description:</b><br>
        This is a basic XML syntax that keeps all whitespace characters intact when they are parsed. Spacing 
        characters can be an important part of some CSS properties, so including this attribute in the 
        standards for this element makes sense.
    <dd><b class="l3heading">Values:</b> <b class="alert">preserve</b> - maintain all 
        whitespace characters in rendering and data storage (including multiple
        spaces, tabs, carriage returns and linefeeds.)
</dl>


<a name="example"></a>
<dl>
<dt><big><b class="mainheading">Example</b></big>
    <dd><div class="example">&lt;<b class="tagname">html</b>&gt;<br>
        &lt;<b class="tagname">head</b>&gt;<br>
        &#160;&#160;&#160;&#160;&lt;<b class="tagname">title</b>&gt;Style
        Sheet Example&lt;/<b class="tagname">title</b>&gt;<br>
        &lt;<b class="tagname">style</b>
        <span class="tagattrib">type</span>=&quot;text/css&quot;&gt;<br>
        &lt;<b class="tagname">!--</b><br>
        &#160;&#160;&#160;&#160;<span class="property">h1</span> { <br>
        &#160;&#160;&#160;&#160;<span class="property">font-weight:</span> bold;<br>
        &#160;&#160;&#160;&#160;<span class="property">font-size:</span> 12pt;<br>
        &#160;&#160;&#160;&#160;<span class="property">line-height:</span> 14pt;<br>
        &#160;&#160;&#160;&#160;<span class="property">font-family:</span> helvetica;<br>
        &#160;&#160;&#160;&#160;<span class="property">font-style:</span> normal<br>
        &#160;&#160;&#160;&#160;}<br>
        <b class="tagname">--</b>&gt;<br>
        &lt;/<b class="tagname">style</b>&gt;<br>
        &lt;/<b class="tagname">head</b>&gt;<br>
        &lt;<b class="tagname">body</b>&gt;<br>
        &#160;&#160;&#160;&#160;This is plain text<br>
        &#160;&#160;&#160;&#160;&lt;<b class="tagname">h1</b>&gt;This is Heading 1
        affected by a style sheet&lt;/<b class="tagname">h1</b>&gt;<br>
        &#160;&#160;&#160;&#160;This is plain text<br>
        &lt;/<b class="tagname">body</b>&gt;<br>
        &lt;/<b class="tagname">html</b>&gt;<br></div>
</dl>


<a name="model"></a>
<dl>
<dt><big><b class="mainheading">Parent Model</b></big>
    <dd>&lt;<a href="../h/head.htm">head</a>&gt;
<dt><big><b class="mainheading">Content Model</b></big>
    <dd><b class="alert">%<a href="../shorthands.htm#text">Text</a>%</b> |
        &lt;<a href="../c/comment.htm">!-- --</a>&gt;
</dl>


<a name="tips"></a>
<big><b class="mainheading">Tips &amp; Tricks</b></big>
<ul>
    <li><b class="alert">DTD Note:</b> This element existed in HTML 3.0, but was
        much different than it is now. It was then added to the HTML 3.2 recommendation 
        as a place holder until HTML 4.0 which details the usage of the element.
    <li>It appears that more than one STYLE element can be used in
        the HEAD area. This may prove useful in areas where Netscape's JSS
        proves to be incompatible with CSS.
    <li>[Tests: <a href="../../../testing/html/tags/s/style-bp1.htm">1</a>,
        <a href="../../../testing/html/tags/s/style-bp2.htm">2</a>]
        While the author CAN legally omit using the HTML comment to
        encapsulate the Style information, most older browsers will display
        the style information in these cases as document content. Authors are
        strongly encouraged to use the HTML Comment for the Style element to
        prevent this from happening.
    <li>For more information on Style Sheets, please see
        <a href="http://www.blooberry.com/indexdot/css/index.html" class="relevant">Index DOT Css</a>.
</ul>

<a name="peculiar"></a>
<big><b class="mainheading">Browser Peculiarities</b></big>
<ul>
    <li><a href="../../../testing/html/tags/s/style-bp3.htm">[Test]</a>
        IE 4.0 only supports the 'screen', 'print' and 'all' Media
        attribute values.
    <li><a href="../../../testing/html/tags/s/style-bp4.htm">[Test]</a>
        IE 3.0 only allowed for a single LINK or STYLE block. Only the last one 
        specified in the document is used. IE 4.0 and above, Netscape and Opera 
        merge/cascade multiple STYLE elements.
    <li>According to a document on the Mozilla web site, Netscape 4 (and possibly
        more) also supports these attributes (of course they don't have ANY
        explanation with this claim): HREF, ARCHIVE, CODEBASE and SRC. I have
        never seen these attributes mentioned elsewhere, and have not been able
        to verify yet if these attributes are supported or not, nor do I know
        their exact usage if so.
</ul>


<br>
<a href="../../../misc/copyright.htm">Boring Copyright Stuff...</a>

</BODY>
</HTML>
